package cn.cj.erp.serviceimpl.system;

import cn.cj.erp.common.utils.Convert;
import cn.cj.erp.bo.system.SysLoginLogBo;
import cn.cj.erp.entity.system.SysLoginLog;
import cn.cj.erp.dao.system.SysLoginLogDao;
import cn.cj.erp.service.system.SysLoginLogService;
import cn.cj.erp.serviceimpl.base.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 系统访问记录表
 * @author chenjian
 */
@Service
public class SysLoginLogServiceImpl extends ServiceImpl<SysLoginLog, SysLoginLogBo>
        implements SysLoginLogService {
    @Resource
    private SysLoginLogDao sysLoginLogDao;

    @Override
    public SysLoginLogDao getBaseMapper() {
        return sysLoginLogDao;
    }

    @Override
    public SysLoginLog convert2Entity(SysLoginLogBo sysLoginLogBo) {
        return Convert.convert(sysLoginLogBo, SysLoginLog.class);
    }

    @Override
    public SysLoginLogBo convert2Bo(SysLoginLog sysLoginLog) {
        return Convert.convert(sysLoginLog, SysLoginLogBo.class);
    }

    @Override
    public Boolean clean() {
        getBaseMapper().clean();
        return true;
    }
}
